import { defHttp } from '@/utils/http';

enum Api {
  getQuick = '/dashboard/workplace/get_quick',
}

//获取快捷操作
export function getQuick(params: object) {
  return defHttp.get<QuickItem[]>(
    { url: Api.getQuick, params: params },
    { errorMessageMode: 'message' }
  );
}

//快捷类型
export interface QuickItem {
  id: number;
  name: string;
  icon: string;
  path_url: string;
  is_common: number;
  type: number;
}
